import { SET_USER_INFO, USER_LOGOUT } from '../actionTypes/user'

const reducer = (initState = {}, action) => {
  switch (action.type) {
    case SET_USER_INFO:
      return action.payload

    case USER_LOGOUT:
      return action.payload

    default:
      return initState
  }
}

export default reducer
